1. Technical Field
The present application relates generally to an improved data processing system and method. More specifically, the present application is directed to a mechanism to enhance the scalability of network caching capability in a virtualized environment.
2. Description of Related Art
Transmission control protocol/Internet Protocol (TCP/IP) is a communications protocol developed under contract from the U.S. Department of Defense to inter-network dissimilar systems. A TCP/IP network application can use operating system (OS) provided network application program interfaces (APIs) to request information on a remote machine that runs the server application. This is referred to as a client/server architecture.
The operating system provided network APIs can support multiple map types, such as group, password, services, protocols, hosts, networks, and netgroup. For example, for the “hosts” map type, the operating system will provide APIs “gethostbyname” and “gethostbyaddr” to do host name to IP address mapping and IP address to host name mapping, respectively. This task is done by the resolver, which is the client part of a name service.
The resolver can be configured to get the information from different locations, such as a network information services (NIS) server, a domain name system (DNS) server, a lightweight directory access protocol (LDAP) server, or a local /etc/hosts file, for example.
If the resolver uses DNS, then for each API call (e.g., gethostbyname), the resolver sends the request over the network to a remote DNS server. The DNS server returns an answer. The time spent between resolver and DNS server over the network may become significant if the application makes a lot of API calls.
If the resolver uses a local file, then for each API call (e.g., gethostbyname), the resolver must parse the entire local /etc/hosts file to find the answer. If the /etc/hosts file is large, which happens on a lot of real customer systems, the resolver will take a long time to get the answer.
To solve this problem, operating system vendors provide a network caching daemon that runs on the client (resolver) side. The network caching daemon hashes all of the local file (e.g., /etc/group, /etc/passwd, /etc/services, /etc/protocols, /etc/hosts, /etc/networks, /etc/netgroup) entries into the network caching daemon so that the resolver does not do the linear search from the local file if it is configured to resolve the local way. The network caching daemon caches all of the positive and negative answers from the network server (e.g., NIS, NIS+, DNS, LDAP). The resolver may then query the network caching daemon first before going out on the network to query the network server if it is configured to use the non-local way.
The network caching daemon works well. However, the network caching daemon technique requires a 1:1 model. For each network client, there must be a network caching daemon running.